import Vue from 'vue'
import Vuex from 'vuex'
import storeConstant from './storeConstant'
const { AUTH_LISTFN_MUTATION, WEB_SITE_MUTATION } = storeConstant

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        authList: [], // 权限列表
        webSite: {}, // 网站信息
    },
    getters: {

    },
    mutations: {
        [AUTH_LISTFN_MUTATION] (state, authList) {
            console.log(authList)
            state.authList = authList
        },
        [WEB_SITE_MUTATION] (state, webSite) {
            console.log(webSite)
            state.webSite = webSite
        }
    },
    actions: {

    },
    modules: {

    }
})

export default store
